.chatPage {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.chatHeader {
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chatHeader h2 {
  margin: 0;
  color: #333;
  font-size: 24px;
  font-weight: 600;
}

.chatHeader p {
  margin: 5px 0 0 0;
  color: #666;
  font-size: 14px;
}

.chatContainer {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
  margin: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.messagesContainer {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f8f9fa;
}

.message {
  margin-bottom: 20px;
  display: flex;
}

.message.userMessage {
  justify-content: flex-end;
}

.botMessage {
  justify-content: flex-start;
}

.messageContent {
  max-width: 70%;
  padding: 15px;
  border-radius: 18px;
  position: relative;
}

.userMessage .messageContent {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.botMessage .messageContent {
  background: white;
  border: 2px solid #e9ecef;
  color: #333;
}

.messageHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  opacity: 0.8;
}

.sender {
  font-weight: 600;
}

.timestamp {
  font-size: 11px;
}

.messageText {
  line-height: 1.5;
  word-wrap: break-word;
}

.wordPreview {
  margin-top: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.wordPreviewHeader {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.wordIcon {
  font-size: 16px;
}

.wordTitle {
  flex: 1;
  font-weight: 600;
  color: #495057;
}

.viewButton {
  padding: 6px 12px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.3s;
}

.viewButton:hover {
  background: #0056b3;
}

.wordPreviewContent {
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  max-height: 1000px;
  overflow-y: auto;
  padding: 15px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  font-family: "Microsoft YaHei", "宋体", Arial, sans-serif;
}

/* Word文档内容的样式 */
.wordPreviewContent p {
  margin: 0 0 10px 0;
}

.wordPreviewContent h1, .wordPreviewContent h2, .wordPreviewContent h3 {
  margin: 15px 0 8px 0;
  color: #333;
}

.wordPreviewContent h1 {
  font-size: 18px;
  border-bottom: 2px solid #007bff;
  padding-bottom: 5px;
}

.wordPreviewContent h2 {
  font-size: 16px;
  color: #495057;
}

.wordPreviewContent h3 {
  font-size: 14px;
  color: #6c757d;
}

.wordPreviewContent ul, .wordPreviewContent ol {
  margin: 10px 0;
  padding-left: 20px;
}

.wordPreviewContent li {
  margin: 5px 0;
}

.wordPreviewContent strong {
  font-weight: 600;
  color: #333;
}

.inputContainer {
  display: flex;
  padding: 20px;
  background: white;
  border-top: 1px solid #e9ecef;
  gap: 10px;
}

.messageInput {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 24px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: border-color 0.3s;
}

.messageInput:focus {
  border-color: #667eea;
}

.sendButton {
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.sendButton:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.sendButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 滚动条样式 */
.messagesContainer::-webkit-scrollbar {
  width: 6px;
}

.messagesContainer::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.messagesContainer::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.messagesContainer::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .chatContainer {
    margin: 10px;
  }
  
  .messageContent {
    max-width: 85%;
  }
  
  .chatHeader {
    padding: 15px;
  }
  
  .chatHeader h2 {
    font-size: 20px;
  }
}